#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void reverse(int N)
{
	printf("%d", N % 10);
	if (N / 10 != 0)
		reverse(N / 10);
	if (N == 0)
		return;
}
int main()
{
	int N = 0;
	scanf("%d", &N);
	if (N == 0)
	{
		printf("0\n");
		return 0;
	}
	if (N < 0)
	{
		N *= -1;
		printf("-");
	}
	while (N % 10 == 0)
	{
		N /= 10;
	}
	reverse(N);
	return 0;
}